<?php
// +----------------------------------------------------------------------
// | ThinkPHP [ WE CAN DO IT JUST THINK ]
// +----------------------------------------------------------------------
// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: liu21st <liu21st@gmail.com>
// +----------------------------------------------------------------------
use think\Route;

 // Route::get('api/v1/banner/:id','api/v1.Banner/getBanner');
 Route::get('api/:version/banner/:id','api/:version.Banner/getBanner');

 Route::get('api/:version/theme','api/:version.Theme/getSimpleList');
 // 需打开完全匹配路由
 Route::get('api/:version/theme/:id','api/:version.Theme/getComplexOne');

 //商品系列接口
 Route::group('api/:version/product',function(){
 	Route::get('/:id','api/:version.product/getOne',[],['id'=>'\d+']);
 	Route::get('/recent','api/:version.Product/getRecent');
 	Route::get('/by_category/:id','api/:version.product/getAllInCategory');
 });

 //有关地址接口
 Route::post('api/:version/address','api/:version.Address/createOrUpdateAddress');
 //所有分类
 Route::get('api/:version/category/all','api/:version.Category/getAllCategories');

 //获取token
 Route::post('api/:version/token/user','api/:version.Token/getToken');
 
 //创建订单
 Route::post('api/:version/order','api/:version.Order/placeOrder');
 
 //下单支付
 Route::post('api/:version/pay/pre_order','api/:version.pay/getPreOrder');

 //微信回调通知 后面不能带?param=xxx 微信会自动清除额外参数
 Route::post('api/:version/pay/notify','api/:version.Pay/receiveNotify');
 Route::get('test','api/v1.Test/one');
 // Route::get('test2','api/v1.Address/second');

 
